package com.lhhu.demo.mapper;

import com.lhhu.demo.bean.OrderMessage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Auther 虎
 * @Data 2021/3/23 14:57
 * @Version 1.0
 */
@Repository
public interface OrderMapper {
    int addOneOrder(OrderMessage orderMessage);
    List<OrderMessage> getAllOrderByStatus(String orderStatus);
    List<OrderMessage> getAllOrderByUserAndStatus(@Param("openid") String openid,@Param("orderStatus") String orderStatus);
    List<OrderMessage> getAllOrderByUser(String openid);
    int confirmOrder(@Param("orderId") String orderId,@Param("orderStatus") String orderStatus);
    List<OrderMessage> getAllOrderByOrderId(@Param("orderId") String orderId,@Param("orderStatus")String orderStatus);
    List<OrderMessage> getAllOrderByPhone(@Param("orderPhone") String orderPhone,@Param("orderStatus")String orderStatus);
    List<OrderMessage> getAllOrderByTime(@Param("begindate") String begindate, @Param("enddate") String enddate,@Param("orderStatus")String orderStatus);
    int deleteOneOrder(String orderId);
}
